<?php

namespace app\models\base;

use Yii;

/**
 * This is the model class for table "chindor_activity".
 *
 * @property string $activity_id
 * @property integer $project_id
 * @property integer $parent_id
 * @property string $path
 * @property string $name
 * @property integer $value_define_user_id
 * @property integer $value_define_type
 * @property integer $apply_user_id
 * @property integer $type
 * @property integer $handler_user_id
 * @property integer $create_time
 * @property integer $start_time
 * @property integer $continued_time
 * @property integer $finish_time
 * @property string $information
 * @property string $desc
 * @property double $all_cost
 * @property integer $all_gold
 * @property integer $all_value
 * @property integer $surplus_value
 * @property integer $surplus_gold
 * @property integer $last_modify
 * @property integer $status
 * @property integer $disabled
 */
class Activity extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'chindor_activity';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['project_id', 'parent_id', 'value_define_user_id', 'value_define_type', 'apply_user_id', 'type', 'handler_user_id', 'create_time', 'start_time', 'continued_time', 'finish_time', 'all_gold', 'surplus_gold', 'last_modify', 'status', 'disabled','is_accept','schedule','priority','review_time'], 'integer'],
            [['all_cost','all_value','surplus_value','surplus_cost','expect_cost'], 'number'],
            [['path', 'name', 'information', 'desc','image','attachment'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'activity_id' => 'Activity ID',
            'project_id' => 'Project ID',
            'parent_id' => 'Parent ID',
            'path' => 'Path',
            'name' => 'Name',
            'value_define_user_id' => 'Value Define User ID',
            'value_define_type' => 'Value Define Type',
            'apply_user_id' => 'Apply User ID',
            'type' => 'Type',
            'handler_user_id' => 'Handler User ID',
            'create_time' => 'Create Time',
            'start_time' => 'Start Time',
            'continued_time' => 'Continued Time',
            'finish_time' => 'Finish Time',
            'information' => 'Information',
            'desc' => 'Desc',
            'all_cost' => 'All Cost',
            'all_gold' => 'All Gold',
            'all_value' => 'All Value',
            'surplus_value' => 'Surplus Value',
            'surplus_gold' => 'Surplus Gold',
            'last_modify' => 'Last Modify',
            'status' => 'Status',
            'disabled' => 'Disabled',
        ];
    }
}
